fix(monorepo): unbreak Docker build (workspaces glob+negation)#2952
Merged
Conversation
PR #2950 enumerated workspaces explicitly to exclude apps/mcp-server, but that broke the API's Docker build: error: Workspace not found "apps/app" error: Workspace not found "apps/framework-editor" error: Workspace not found "apps/portal" The Dockerfile only COPYs apps/api into the build context, so when bun reads package.json and tries to find the other named apps, it fails. The original "apps/*" glob worked because globs only match what exists; explicit paths require the path to exist. Fix: combine glob with negation — ["apps/*", "!apps/mcp-server", "packages/*"] Verified locally: - bun install at root succeeds - node_modules/@trycompai/mcp-server is NOT created - bun.lock has zero references to apps/mcp-server - Original Docker-friendly glob behavior preserved (matches only existing paths) This unbreaks the API Docker build that PR #2950 broke, while still keeping apps/mcp-server outside the bun workspace so Speakeasy's CI npm install doesn't choke on workspace:* protocol. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 3.65.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #2950 (merged earlier) enumerated workspaces explicitly to exclude `apps/mcp-server`, but that broke the API's Docker build in the auto-PR to release:
```
error: Workspace not found "apps/app"
error: Workspace not found "apps/framework-editor"
error: Workspace not found "apps/portal"
```
The Dockerfile only COPYs `apps/api` into the build context, so when bun reads `package.json` and tries to find the other named apps, it fails. The original `apps/*` glob worked because globs only match what exists; explicit paths require the path to exist.
Fix
Combine glob with negation:
```json
["apps/", "!apps/mcp-server", "packages/"]
```
`apps/*` matches only what exists in any given context (whether full repo or Docker subset), while `!apps/mcp-server` excludes `apps/mcp-server` from the bun workspace.
Verified locally
This keeps the Speakeasy fix from PR #2950 (mcp-server outside the workspace → no `workspace:*` protocol errors in Speakeasy CI) while restoring the Docker-compatible glob.
Test plan
🤖 Generated with Claude Code